Move definition of which-key--local-binding-p
authorJonas Bernoulli <jonas@bernoul.li>
Wed, 31 Aug 2016 12:41:41 +0000 (14:41 +0200)
committerJonas Bernoulli <jonas@bernoul.li>
Wed, 31 Aug 2016 12:41:41 +0000 (14:41 +0200)
It has to be defined after the inline functions which it uses.

which-key.el

index 0c98a9ab2cce3eb6a47d0c9a54f32854b9a84a32..90aea83f7b4e0824c7df123e651763613d507938 100644 (file)
@@ -1202,11 +1202,6 @@ coming before a prefix. Within these categories order using
         (and (not apref?) bpref?)
       (which-key-key-order acons bcons))))
 
-(defun which-key--local-binding-p (keydesc)
-  (eq (which-key--safe-lookup-key
-       (current-local-map) (kbd (which-key--current-key-string (car keydesc))))
-      (intern (cdr keydesc))))
-
 (defun which-key-local-then-key-order (acons bcons)
   "Order first by whether A and/or B is a local binding with
 local bindings coming first. Within these categories order using
@@ -1254,6 +1249,11 @@ replacement occurs return the new STRING."
 (defsubst which-key--current-key-string (&optional key-str)
   (key-description (which-key--current-key-list key-str)))
 
+(defun which-key--local-binding-p (keydesc)
+  (eq (which-key--safe-lookup-key
+       (current-local-map) (kbd (which-key--current-key-string (car keydesc))))
+      (intern (cdr keydesc))))
+
 (defun which-key--maybe-replace-prefix-name (keys desc)
   "KEYS is a list of keys produced by `listify-key-sequences' and
 `key-description'. DESC is the description that is possibly